package com.jade.store.wechat.biz.service.account;

import com.jade.store.wechat.biz.common.WxConstantUtil;
import com.jade.store.wechat.biz.protocol.account.QrcodeCreatePermanentReq;
import com.jade.store.wechat.biz.protocol.account.QrcodeCreateTemReq;
import com.jade.store.wechat.biz.protocol.user.UserGetReq;
import com.jade.store.wechat.biz.service.BaseWxService;

/**
 * 授权推送服务
 * User: jinya
 * Date: 2016/12/13
 * Time: 14:30
 * TEL :17701640710   MAIL:2009_jinya@163.com
 * To change this template use File | Settings | File Templates.
 */
public class QrcodeCreateService extends BaseWxService {

    public QrcodeCreateService(String appid) throws IllegalAccessException, InstantiationException, ClassNotFoundException {
        super(appid,WxConstantUtil.api_qrcode_create);
    }
    /**
     * 临时二维码
     * @param req 这个数据对象里面包含了API要求提交的各种数据字段
     * @return API返回的数据
     * @throws Exception
     */
    public String requestTemp(QrcodeCreateTemReq req) throws Exception {
        //--------------------------------------------------------------------
        //发送HTTPS的Post请求到API地址
        //--------------------------------------------------------------------
        String responseString = sendJsonPost(req);
        return responseString;
    }
    /**
     * 永久二维码
     * @param req 这个数据对象里面包含了API要求提交的各种数据字段
     * @return API返回的数据
     * @throws Exception
     */
    public String requestPer(QrcodeCreatePermanentReq req) throws Exception {
        //--------------------------------------------------------------------
        //发送HTTPS的Post请求到API地址
        //--------------------------------------------------------------------
        String responseString = sendJsonPost(req);
        return responseString;
    }
}
